package com.zero.guava.samples.EventBus;

import com.google.common.eventbus.Subscribe;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 创建Listener
 * @Subscribe注解将任意的类的方法变为一个Listener
 *
 */

public class SimpleListener {

    private final static Logger LOGGER = LoggerFactory.getLogger(SimpleListener.class);

    @Subscribe
    public void doAction(final String event){
        LOGGER.info("Received event ["+event+"] and will take a action");
    }
}
